﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Hosting;
using System.Web.Security;

namespace oAuthDemo.OpenIDProvider
{
    public class XmlMembershipService : IMembershipService
    {
        public XmlMembershipService()
        {
            MembershipProvider = new ReadOnlyXmlMembershipProvider(HostingEnvironment.MapPath("~/App_Data/Users.xml"));
        }

        public ReadOnlyXmlMembershipProvider MembershipProvider { get; private set; }

        public bool ValidateUser(string userName, string password)
        {
            return MembershipProvider.ValidateUser(userName, password);
        }
    }
}